package com.basics.api.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.basics.api.request.organization.EditOrganizationReq;
import com.basics.api.request.organization.GroupOrganizationMemberReq;
import com.basics.api.request.organization.JoinOrganiztionByPhoneReq;
import com.basics.api.request.organization.OperateGroupReq;
import com.basics.api.response.organization.GroupOrganizationData;
import com.basics.api.response.organization.GroupOrganizationMemberListData;
import com.basics.api.response.organization.InvitionUrlData;
import com.basics.api.response.organization.OrganizationInfoData;
import com.basics.channel.entity.CyChannel;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

public interface OrganizationApiService {

    /**
     * 获取组织详情信息
     * @param id
     * @return
     */
    OrganizationInfoData getOrganizationInfo(Long id,Long userId);

    /**
     * 邀请好友链接
     * @param id
     * @param userId
     * @return
     */
    InvitionUrlData getInvitionUrl(Long id, Long userId);

    /**
     * 分页获取组织成员列表
     * @param req
     * @param userId
     * @return
     */
    IPage<GroupOrganizationMemberListData> selectGroupOrganizationMemberList(GroupOrganizationMemberReq req,Long userId);

    /**
     * 获取组织分组数据
     * @param id
     * @param userId
     * @return
     */
    GroupOrganizationData getGroupOrganization(Long id, Long userId);

    /**
     * 新增/修改组织分组数据
     * @param req
     * @param userId
     * @param id
     */
    void saveGroupOrganization(EditOrganizationReq req, Long userId,Long id);

    /**
     * 获取编辑组织分组数据
     * @param id
     * @param userId
     * @return
     */
    EditOrganizationReq getEditOrganizationGroupInfo(String id,Long userId);

    /**
     * 删除组织分组数据
     * @param id
     * @param userId
     */
    void deleteGroupOrganization(String id,Long userId);

    /**
     * 移除用户分组信息
     * @param req
     * @param userId
     */
    void removeGroupOrganization(OperateGroupReq req, Long userId);

    /**
     * 新增用户分组信息
     * @param req
     * @param userId
     */
    void addGroupOrganization(OperateGroupReq req, Long userId,Long organizationId);

    /**
     * 保存频道信息
     * @param cyChannel
     * @param userId
     * @param organizationId
     */
    void saveChannel(CyChannel cyChannel,Long userId,Long organizationId);

    /**
     * 删除频道
     * @param channelId
     * @param userId
     * @param organizationId
     */
    void deleteChannel(Long channelId,Long userId,Long organizationId);

    /**
     * 通过手机号加入组织
     * @param req
     */
    void joinOrganizationByPhone(JoinOrganiztionByPhoneReq req);

    /**
     * 切换组织的时候 推送全部频道消息
     * @param organizationId
     * @param userId
     */
    void pushChannelMsg(Long organizationId,Long userId);
}
